﻿@model IEnumerable<dynamic>
@{
    Bundle("lightbox");
}

<ul class="images" id="@ID("images")">
@if(Model.Any())
{
    <script type="text/javascript">
        jQuery(document).ready(function () {
            jQuery('@ID("#images") li a').lightBox({
                imageBlank: '@Url.Theme("Images/lightbox_blank.gif")',
                imageLoading: '@Url.Theme("Images/loader.gif")',
                imageBtnClose: '@Url.Theme("Images/lightbox_close_btn.gif")',
                imageBtnPrev: '@Url.Theme("Images/lightbox_prev_btn.gif")',
                imageBtnNext: '@Url.Theme("Images/lightbox_next_btn.gif")',
                txtImage: '',
                txtOf: '/'
            });
        });
    </script>
    foreach(var i in Model)
    {
        <li class="@JDM.String(i.MimeType)">
            <a href="@Url.Action(Loc.Act("Image").Ctrl("Media").NoArea().Set(new
            {
                guid = JDM.Guid(i.Guid)
            }))" title="@JDM.String(i.Name)">@{Html.RenderPartial("_Image", new
            {
                File = i,
                Size = Svc.Config(Par.In("WebPortal").Of(this).Name("ThumbSize"), 48)
            });}</a>
        </li>
    }
}
else
{
    <li class="empty"><span>@T(Res.In("Common").Of("Expr").Name("NoData"))</span></li>
}
</ul>
